package com.rzl.expense.expense.service.impl;

import java.util.List;
import com.rzl.expense.common.utils.DateUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzl.expense.expense.mapper.RentBillamountMapper;
import com.rzl.expense.expense.domain.RentBillamount;
import com.rzl.expense.expense.service.IRentBillamountService;

/**
 * 房租账单汇总Service业务层处理
 * 
 * @author expense
 * @date 2025-03-11
 */
@Service
public class RentBillamountServiceImpl implements IRentBillamountService 
{
    @Autowired
    private RentBillamountMapper rentBillamountMapper;

    /**
     * 查询房租账单汇总
     * 
     * @param billamountId 房租账单汇总主键
     * @return 房租账单汇总
     */
    @Override
    public RentBillamount selectRentBillamountByBillamountId(String billamountId)
    {
        return rentBillamountMapper.selectRentBillamountByBillamountId(billamountId);
    }

    /**
     * 查询房租账单汇总列表
     * 
     * @param rentBillamount 房租账单汇总
     * @return 房租账单汇总
     */
    @Override
    public List<RentBillamount> selectRentBillamountList(RentBillamount rentBillamount)
    {
        return rentBillamountMapper.selectRentBillamountList(rentBillamount);
    }

    /**
     * 新增房租账单汇总
     * 
     * @param rentBillamount 房租账单汇总
     * @return 结果
     */
    @Override
    public int insertRentBillamount(RentBillamount rentBillamount)
    {
        rentBillamount.setCreateTime(DateUtils.getNowDate());
        return rentBillamountMapper.insertRentBillamount(rentBillamount);
    }

    /**
     * 修改房租账单汇总
     * 
     * @param rentBillamount 房租账单汇总
     * @return 结果
     */
    @Override
    public int updateRentBillamount(RentBillamount rentBillamount)
    {
        rentBillamount.setUpdateTime(DateUtils.getNowDate());
        return rentBillamountMapper.updateRentBillamount(rentBillamount);
    }

    /**
     * 批量删除房租账单汇总
     * 
     * @param billamountIds 需要删除的房租账单汇总主键
     * @return 结果
     */
    @Override
    public int deleteRentBillamountByBillamountIds(String[] billamountIds)
    {
        return rentBillamountMapper.deleteRentBillamountByBillamountIds(billamountIds);
    }

    /**
     * 删除房租账单汇总信息
     * 
     * @param billamountId 房租账单汇总主键
     * @return 结果
     */
    @Override
    public int deleteRentBillamount(String startDate, String endDate)
    {
        return rentBillamountMapper.deleteRentBillamount(startDate,endDate);
    }




    @Override
    public void batchRentBillamount(List<RentBillamount> list)
    {

         rentBillamountMapper.batchRentBillamount(list);
    }


}
